




$("#but_xg").click(function(){
	var user1 = JSON.parse(window.sessionStorage.getItem("user"))
	var pass1 = $("#user1").val()
	var pass2 = $("#user2").val()
	var pass3 = $("#user3").val()
	if(pass3 != pass2){
		alert("确认密码与新密码输入不一致")
	}else{
		$.ajax({
			url: "http://student.qhynice.top/j_editpass.php",
			type: "get",
			data: {
				"user_account":user1,
				"password":pass1,
				"new_password1":pass2,
				"new_password2":pass3
			},
			dataType: "json",
			success: function(data) {
				console.log(data)
				if(data.status == 0){
					alert("原密码输入不正确，请重新输入")
				}else{
					alert("密码修改成功")
					// window.history.go(-1);  
					
					window.location.href="学生信息管理.html"
				}
		
			}
		})
	}
	
	
	
})
